﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using Backend;
using Data_Layer;

namespace WCFService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService" in both code and config file together.
    [ServiceContract]
    public interface IRESTService 
    {
        //BOOKING Methods

        [OperationContract]
        [WebGet(UriTemplate = "/createBooking/{plateNO}/{bookedTime}", BodyStyle = WebMessageBodyStyle.Wrapped)]
        int createBooking(string plateNO, string bookedTime);

        [OperationContract]
        [WebGet(UriTemplate = "/deleteBooking/{bookingNO}")]
        string deleteBooking(string bookingNO);

        [OperationContract]
        [WebGet(UriTemplate = "/readBooking/{bookingNO}")]
        Booking readBooking(string bookingNO);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string updateBooking(string bookingNO, string bookedTime);

        [OperationContract]
        [WebGet(UriTemplate = "/getallBookings")]
        Booking[] getallBookings();
    }    
}
